// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_WIP_MTRL_CUR
// * CreateDate    : 2014-06-05 18:30:22
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:22
// * LastChanger   : 2014-06-05 18:30:22
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class ProdWipMtrlCurEntity : EntityBase
    {
        public ProdWipMtrlCurTable TableSchema
        {
            get
            {
                return ProdWipMtrlCurTable.Current;
            }
		}
		
		public ProdWipMtrlCurEntity()
        {

        }
		
		public ProdWipMtrlCurEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["Id"]));
			this.WoNo = Convert.ToString(CommonFunctions.ToObject(dr["Wo_No"]));
			this.ProdCode = Convert.ToString(CommonFunctions.ToObject(dr["Prod_Code"]));
			this.ProdName = Convert.ToString(CommonFunctions.ToObject(dr["Prod_Name"]));
			this.MtrlSn = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_SN"]));
			this.MtrlCode = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Code"]));
			this.MtrlName = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Name"]));
			this.MtrlLocationNo = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Location_No"]));
			this.MtrlLocationName = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Location_Name"]));
			this.CurWorkgroupNo = Convert.ToString(CommonFunctions.ToObject(dr["Cur_WorkGroup_No"]));
			this.CurAssetCode = Convert.ToString(CommonFunctions.ToObject(dr["Cur_Asset_Code"]));
			this.CurAssetName = Convert.ToString(CommonFunctions.ToObject(dr["Cur_Asset_Name"]));
			this.LotsNo = Convert.ToString(CommonFunctions.ToObject(dr["Lots_No"]));
			this.MtrlStatus = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Status"]));
			this.MtrlQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["Mtrl_Qty"]));
			this.CurProcNo = Convert.ToString(CommonFunctions.ToObject(dr["Cur_Proc_No"]));
			this.CurProcName = Convert.ToString(CommonFunctions.ToObject(dr["Cur_Proc_Name"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["Unit"]));
			this.RelatedNo = Convert.ToString(CommonFunctions.ToObject(dr["Related_No"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
        }
		
		public ProdWipMtrlCurEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["Id"]));
			this.WoNo = Convert.ToString(CommonFunctions.ToObject(dr["Wo_No"]));
			this.ProdCode = Convert.ToString(CommonFunctions.ToObject(dr["Prod_Code"]));
			this.ProdName = Convert.ToString(CommonFunctions.ToObject(dr["Prod_Name"]));
			this.MtrlSn = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_SN"]));
			this.MtrlCode = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Code"]));
			this.MtrlName = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Name"]));
			this.MtrlLocationNo = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Location_No"]));
			this.MtrlLocationName = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Location_Name"]));
			this.CurWorkgroupNo = Convert.ToString(CommonFunctions.ToObject(dr["Cur_WorkGroup_No"]));
			this.CurAssetCode = Convert.ToString(CommonFunctions.ToObject(dr["Cur_Asset_Code"]));
			this.CurAssetName = Convert.ToString(CommonFunctions.ToObject(dr["Cur_Asset_Name"]));
			this.LotsNo = Convert.ToString(CommonFunctions.ToObject(dr["Lots_No"]));
			this.MtrlStatus = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Status"]));
			this.MtrlQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["Mtrl_Qty"]));
			this.CurProcNo = Convert.ToString(CommonFunctions.ToObject(dr["Cur_Proc_No"]));
			this.CurProcName = Convert.ToString(CommonFunctions.ToObject(dr["Cur_Proc_Name"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["Unit"]));
			this.RelatedNo = Convert.ToString(CommonFunctions.ToObject(dr["Related_No"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdWipMtrlCurTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Id)); }
            set { SetData(ProdWipMtrlCurTable.C_Id, value); }
        }
		
        [DataMember]
        public string WoNo
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Wo_No)); }
            set { SetData(ProdWipMtrlCurTable.C_Wo_No, value); }
        }
		
        [DataMember]
        public string ProdCode
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Prod_Code)); }
            set { SetData(ProdWipMtrlCurTable.C_Prod_Code, value); }
        }
		
        [DataMember]
        public string ProdName
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Prod_Name)); }
            set { SetData(ProdWipMtrlCurTable.C_Prod_Name, value); }
        }
		
        [DataMember]
        public string MtrlSn
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Mtrl_SN)); }
            set { SetData(ProdWipMtrlCurTable.C_Mtrl_SN, value); }
        }
		
        [DataMember]
        public string MtrlCode
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Mtrl_Code)); }
            set { SetData(ProdWipMtrlCurTable.C_Mtrl_Code, value); }
        }
		
        [DataMember]
        public string MtrlName
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Mtrl_Name)); }
            set { SetData(ProdWipMtrlCurTable.C_Mtrl_Name, value); }
        }
		
        [DataMember]
        public string MtrlLocationNo
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Mtrl_Location_No)); }
            set { SetData(ProdWipMtrlCurTable.C_Mtrl_Location_No, value); }
        }
		
        [DataMember]
        public string MtrlLocationName
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Mtrl_Location_Name)); }
            set { SetData(ProdWipMtrlCurTable.C_Mtrl_Location_Name, value); }
        }
		
        [DataMember]
        public string CurWorkgroupNo
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Cur_WorkGroup_No)); }
            set { SetData(ProdWipMtrlCurTable.C_Cur_WorkGroup_No, value); }
        }
		
        [DataMember]
        public string CurAssetCode
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Cur_Asset_Code)); }
            set { SetData(ProdWipMtrlCurTable.C_Cur_Asset_Code, value); }
        }
		
        [DataMember]
        public string CurAssetName
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Cur_Asset_Name)); }
            set { SetData(ProdWipMtrlCurTable.C_Cur_Asset_Name, value); }
        }
		
        [DataMember]
        public string LotsNo
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Lots_No)); }
            set { SetData(ProdWipMtrlCurTable.C_Lots_No, value); }
        }
		
        [DataMember]
        public string MtrlStatus
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Mtrl_Status)); }
            set { SetData(ProdWipMtrlCurTable.C_Mtrl_Status, value); }
        }
		
        [DataMember]
        public decimal MtrlQty
        {
            get { return Convert.ToDecimal(GetData(ProdWipMtrlCurTable.C_Mtrl_Qty)); }
            set { SetData(ProdWipMtrlCurTable.C_Mtrl_Qty, value); }
        }
		
        [DataMember]
        public string CurProcNo
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Cur_Proc_No)); }
            set { SetData(ProdWipMtrlCurTable.C_Cur_Proc_No, value); }
        }
		
        [DataMember]
        public string CurProcName
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Cur_Proc_Name)); }
            set { SetData(ProdWipMtrlCurTable.C_Cur_Proc_Name, value); }
        }
		
        [DataMember]
        public string Unit
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Unit)); }
            set { SetData(ProdWipMtrlCurTable.C_Unit, value); }
        }
		
        [DataMember]
        public string RelatedNo
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_Related_No)); }
            set { SetData(ProdWipMtrlCurTable.C_Related_No, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(ProdWipMtrlCurTable.C_CREATED_BY)); }
            set { SetData(ProdWipMtrlCurTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(ProdWipMtrlCurTable.C_CREATED_DATE)); }
            set { SetData(ProdWipMtrlCurTable.C_CREATED_DATE, value); }
        }
		
		#endregion
	}
	
	
}	

